<template>
  <view>
    <u-popup class="stylePopup" v-model="isShow" @close="handleClose" mode="center" border-radius="30"
      :custom-style="{ background: 'transparent' }">
      <view class="styleContainer">
        <image class="styleCover" :src="srcCover" @click.stop="goToJobMain"></image>
        <image class="styleClose" :src="srcClose" @click="isShow = false"></image>
      </view>
    </u-popup>
  </view>
</template>
<script>
export default {
  data() {
    return {
      isShow: false,
      srcCover:
        this.$imgBaseSelf +
        "career/positionDictionary/job_detail_take_part_in.png",
      srcClose:
        this.$imgBaseSelf +
        "career/positionDictionary/job_detail_take_part_in_close.png",
    };
  },
  created() {
    const time = uni.getStorageSync("enterTime");
    console.log("获取enterTime:" + time);
    const today = new Date().toLocaleDateString();
    console.log("today:" + today);
    if (time !== today) {
      this.isShow = true;
      uni.setStorageSync("enterTime", today);
      console.log("保存enterTime:" + today);
    }
  },
  methods: {
    handleClose() {},
    goToJobMain() {
      uni.navigateTo({
        url: "/pagesSub/careerNew/positionDictionary/advertise",
      });
      this.isShow = false;
    },
  },
};
</script>
<style lang="scss" scoped>
.stylePopup {
  background: transparent;

  .styleContainer {
    width: 536rpx;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;

    .styleCover {
      width: 536rpx;
      height: 723rpx;
    }

    .styleClose {
      width: 62.3rpx;
      height: 62.3rpx;
      margin-top: 77rpx;
    }
  }
}
</style>